package vip.bblog.user.entity;


import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import vip.bblog.common.entity.BaseEntity;
import vip.bblog.common.utils.valid.Default;
import vip.bblog.common.utils.valid.Delete;
import vip.bblog.common.utils.valid.Update;

import javax.validation.constraints.NotBlank;
import java.time.LocalDateTime;

/**
 * <p>
 * 系统（后台）用户表
 * </p>
 *
 * @author yuyong
 * @since 2019-04-28
 */
@ApiModel(description = "系统用户对象")
public class SystemUser extends BaseEntity {

    private static final long serialVersionUID = 1L;

    /**
     * id,主键
     */
    @NotBlank(message = "用户id不能为空", groups = {Update.class, Delete.class})
    @TableId(type = IdType.INPUT)
    private String id;

    /**
     * 用户名
     */
    @NotBlank(message = "用户名不能为空", groups = Default.class)
    private String username;

    /**
     * 密码
     */
    @NotBlank(message = "密码不能为空", groups = Default.class)
    private String password;

    /**
     * 昵称
     */
    @NotBlank(message = "昵称不能为空", groups = Default.class)
    private String nickname;

    /**
     * 电话
     */
    private String phone;

    /**
     * 邮箱
     */
    private String email;

    /**
     * 生日
     */
    private LocalDateTime birthday;

    /**
     * 性别，0：女，1：男，2：其他
     */
    private Integer sex;

    /**
     * 头像地址
     */
    private String figureUrl;

    /**
     * 状态，0：未启用，1：启用，2：，3：，4：
     */
    private Integer status;

    /**
     * 创建时间
     */
    private LocalDateTime createTime;

    /**
     * 创建人id
     */
    private String createUserId;

    /**
     * 创建人名称
     */
    private String createUserName;

    /**
     * 更新时间
     */
    private LocalDateTime updateTime;

    /**
     * 更新人id
     */
    private String updateUserId;

    /**
     * 更新人名称
     */
    private String updateUserName;

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }
    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }
    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }
    public String getNickname() {
        return nickname;
    }

    public void setNickname(String nickname) {
        this.nickname = nickname;
    }
    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }
    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }
    public LocalDateTime getBirthday() {
        return birthday;
    }

    public void setBirthday(LocalDateTime birthday) {
        this.birthday = birthday;
    }
    public Integer getSex() {
        return sex;
    }

    public void setSex(Integer sex) {
        this.sex = sex;
    }
    public String getFigureUrl() {
        return figureUrl;
    }

    public void setFigureUrl(String figureUrl) {
        this.figureUrl = figureUrl;
    }
    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }
    public LocalDateTime getCreateTime() {
        return createTime;
    }

    public void setCreateTime(LocalDateTime createTime) {
        this.createTime = createTime;
    }
    public String getCreateUserId() {
        return createUserId;
    }

    public void setCreateUserId(String createUserId) {
        this.createUserId = createUserId;
    }
    public String getCreateUserName() {
        return createUserName;
    }

    public void setCreateUserName(String createUserName) {
        this.createUserName = createUserName;
    }
    public LocalDateTime getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(LocalDateTime updateTime) {
        this.updateTime = updateTime;
    }
    public String getUpdateUserId() {
        return updateUserId;
    }

    public void setUpdateUserId(String updateUserId) {
        this.updateUserId = updateUserId;
    }
    public String getUpdateUserName() {
        return updateUserName;
    }

    public void setUpdateUserName(String updateUserName) {
        this.updateUserName = updateUserName;
    }

    @Override
    public String toString() {
        return "SystemUser{" +
        "id=" + id +
        ", username=" + username +
        ", password=" + password +
        ", nickname=" + nickname +
        ", phone=" + phone +
        ", email=" + email +
        ", birthday=" + birthday +
        ", sex=" + sex +
        ", figureUrl=" + figureUrl +
        ", status=" + status +
        ", createTime=" + createTime +
        ", createUserId=" + createUserId +
        ", createUserName=" + createUserName +
        ", updateTime=" + updateTime +
        ", updateUserId=" + updateUserId +
        ", updateUserName=" + updateUserName +
        "}";
    }
}
